
#1. 确定CMake的最低版本需求
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)

#2. 确定工程名
PROJECT(WtSelStraFact LANGUAGES CXX)
SET(CMAKE_CXX_STANDARD 11)

#7. 添加源码
file(GLOB SRCS "*.cpp")
file(GLOB HDRS "*.h")

SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../build_${PLATFORM}/${CMAKE_BUILD_TYPE}/bin)

INCLUDE_DIRECTORIES(${INCS})
LINK_DIRECTORIES(${LNKS})
ADD_LIBRARY(WtSelStraFact SHARED ${SRCS} ${HDRS})

SET(LIBS
	nlopt	
	boost_filesystem
	dl
)

IF (WIN32)
ELSE (UNIX)
	TARGET_LINK_LIBRARIES(WtSelStraFact ${LIBS})
	SET_TARGET_PROPERTIES(WtSelStraFact PROPERTIES
		CXX_VISIBILITY_PRESET hidden
		C_VISIBILITY_PRESET hidden
		VISIBILITY_INLINES_HIDDEN 1
        LINK_FLAGS_RELEASE -s)
ENDIF ()

